package com.milling.business.service.impl;

import java.util.List;
import com.milling.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.milling.business.mapper.WmsSortingInstockHistoryMapper;
import com.milling.business.domain.WmsSortingInstockHistory;
import com.milling.business.service.IWmsSortingInstockHistoryService;

/**
 * 分拣入库历史Service业务层处理
 *
 * @author X
 * @date 2025-06-05
 */
@Service
public class WmsSortingInstockHistoryServiceImpl implements IWmsSortingInstockHistoryService
{
    @Autowired
    private WmsSortingInstockHistoryMapper wmsSortingInstockHistoryMapper;

    /**
     * 查询分拣入库历史
     *
     * @param id 分拣入库历史主键
     * @return 分拣入库历史
     */
    @Override
    public WmsSortingInstockHistory selectWmsSortingInstockHistoryById(Long id)
    {
        return wmsSortingInstockHistoryMapper.selectWmsSortingInstockHistoryById(id);
    }

    /**
     * 查询分拣入库历史列表
     *
     * @param wmsSortingInstockHistory 分拣入库历史
     * @return 分拣入库历史
     */
    @Override
    public List<WmsSortingInstockHistory> selectWmsSortingInstockHistoryList(WmsSortingInstockHistory wmsSortingInstockHistory)
    {
        return wmsSortingInstockHistoryMapper.selectWmsSortingInstockHistoryList(wmsSortingInstockHistory);
    }

    /**
     * 新增分拣入库历史
     *
     * @param wmsSortingInstockHistory 分拣入库历史
     * @return 结果
     */
    @Override
    public int insertWmsSortingInstockHistory(WmsSortingInstockHistory wmsSortingInstockHistory)
    {
        wmsSortingInstockHistory.setCreateTime(DateUtils.getNowDate());
        return wmsSortingInstockHistoryMapper.insertWmsSortingInstockHistory(wmsSortingInstockHistory);
    }

    /**
     * 修改分拣入库历史
     *
     * @param wmsSortingInstockHistory 分拣入库历史
     * @return 结果
     */
    @Override
    public int updateWmsSortingInstockHistory(WmsSortingInstockHistory wmsSortingInstockHistory)
    {
        wmsSortingInstockHistory.setUpdateTime(DateUtils.getNowDate());
        return wmsSortingInstockHistoryMapper.updateWmsSortingInstockHistory(wmsSortingInstockHistory);
    }

    /**
     * 批量删除分拣入库历史
     *
     * @param ids 需要删除的分拣入库历史主键
     * @return 结果
     */
    @Override
    public int deleteWmsSortingInstockHistoryByIds(Long[] ids)
    {
        return wmsSortingInstockHistoryMapper.deleteWmsSortingInstockHistoryByIds(ids);
    }

    /**
     * 删除分拣入库历史信息
     *
     * @param id 分拣入库历史主键
     * @return 结果
     */
    @Override
    public int deleteWmsSortingInstockHistoryById(Long id)
    {
        return wmsSortingInstockHistoryMapper.deleteWmsSortingInstockHistoryById(id);
    }
}
